package com.example.daliy.stream;

import java.util.ArrayList;
import java.util.List;
import java.util.stream.Collectors;

public class ListTest {

    public static void main(String[] args) {
        ArrayList<Integer> list = new ArrayList<>();
        list.add(1);
        List<Integer> collect = list.stream().filter(item -> item > 1).collect(Collectors.toList());
        System.out.println(collect);
        System.out.println(collect.contains(1));
    }
}
